package com.taobao.api.request;

import java.util.List;
import com.taobao.api.internal.mapping.ApiField;
import com.taobao.api.internal.mapping.ApiListField;
import com.taobao.api.TaobaoObject;
import java.util.Map;

import com.taobao.api.ApiRuleException;
import com.taobao.api.BaseTaobaoRequest;
import com.taobao.api.internal.util.TaobaoHashMap;
import com.taobao.api.internal.util.json.JSONWriter;
import com.taobao.api.response.CainiaoSmartdeliveryStrategyWarehouseIUpdateResponse;

/**
 * TOP API: cainiao.smartdelivery.strategy.warehouse.i.update request
 * 
 * @author top auto create
 * @since 1.0, 2018.07.25
 */
public class CainiaoSmartdeliveryStrategyWarehouseIUpdateRequest extends BaseTaobaoRequest<CainiaoSmartdeliveryStrategyWarehouseIUpdateResponse> {
	
	

	/** 
	* 智能发货设置请求参数
	 */
	private String deliveryStrategySetRequest;

	public void setDeliveryStrategySetRequest(String deliveryStrategySetRequest) {
		this.deliveryStrategySetRequest = deliveryStrategySetRequest;
	}

	public void setDeliveryStrategySetRequest(DeliveryStrategySetRequest deliveryStrategySetRequest) {
		this.deliveryStrategySetRequest = new JSONWriter(false,true).write(deliveryStrategySetRequest);
	}

	public String getDeliveryStrategySetRequest() {
		return this.deliveryStrategySetRequest;
	}

	public String getApiMethodName() {
		return "cainiao.smartdelivery.strategy.warehouse.i.update";
	}

	public Map<String, String> getTextParams() {		
		TaobaoHashMap txtParams = new TaobaoHashMap();
		txtParams.put("delivery_strategy_set_request", this.deliveryStrategySetRequest);
		if(this.udfParams != null) {
			txtParams.putAll(this.udfParams);
		}
		return txtParams;
	}

	public Class<CainiaoSmartdeliveryStrategyWarehouseIUpdateResponse> getResponseClass() {
		return CainiaoSmartdeliveryStrategyWarehouseIUpdateResponse.class;
	}

	public void check() throws ApiRuleException {
	}
	
	/**
 * 地址信息
 *
 * @author top auto create
 * @since 1.0, null
 */
public static class Address extends TaobaoObject {

	private static final long serialVersionUID = 7349616192947556674L;

	/**
		 * 市
		 */
		@ApiField("city")
		private String city;
		/**
		 * 详细地址
		 */
		@ApiField("detail")
		private String detail;
		/**
		 * 区
		 */
		@ApiField("district")
		private String district;
		/**
		 * 省
		 */
		@ApiField("province")
		private String province;
		/**
		 * 街道
		 */
		@ApiField("town")
		private String town;
	

	public String getCity() {
			return this.city;
		}
		public void setCity(String city) {
			this.city = city;
		}
		public String getDetail() {
			return this.detail;
		}
		public void setDetail(String detail) {
			this.detail = detail;
		}
		public String getDistrict() {
			return this.district;
		}
		public void setDistrict(String district) {
			this.district = district;
		}
		public String getProvince() {
			return this.province;
		}
		public void setProvince(String province) {
			this.province = province;
		}
		public String getTown() {
			return this.town;
		}
		public void setTown(String town) {
			this.town = town;
		}

}

	/**
 * 合作CP信息
 *
 * @author top auto create
 * @since 1.0, null
 */
public static class CpInfo extends TaobaoObject {

	private static final long serialVersionUID = 3811656912534183934L;

	/**
		 * 地址信息
		 */
		@ApiField("address")
		private Address address;
		/**
		 * 云打印模板
		 */
		@ApiField("cloud_template_id")
		private String cloudTemplateId;
		/**
		 * 快递公司
		 */
		@ApiField("cp_code")
		private String cpCode;
		/**
		 * 状态: 0-禁用, 1-启用
		 */
		@ApiField("status")
		private Long status;
	

	public Address getAddress() {
			return this.address;
		}
		public void setAddress(Address address) {
			this.address = address;
		}
		public String getCloudTemplateId() {
			return this.cloudTemplateId;
		}
		public void setCloudTemplateId(String cloudTemplateId) {
			this.cloudTemplateId = cloudTemplateId;
		}
		public String getCpCode() {
			return this.cpCode;
		}
		public void setCpCode(String cpCode) {
			this.cpCode = cpCode;
		}
		public Long getStatus() {
			return this.status;
		}
		public void setStatus(Long status) {
			this.status = status;
		}

}

	/**
 * 到货区域
 *
 * @author top auto create
 * @since 1.0, null
 */
public static class AddressArea extends TaobaoObject {

	private static final long serialVersionUID = 6888562218624112159L;

	/**
		 * 市
		 */
		@ApiField("city")
		private String city;
		/**
		 * 省
		 */
		@ApiField("province")
		private String province;
	

	public String getCity() {
			return this.city;
		}
		public void setCity(String city) {
			this.city = city;
		}
		public String getProvince() {
			return this.province;
		}
		public void setProvince(String province) {
			this.province = province;
		}

}

	/**
 * 特殊线路
 *
 * @author top auto create
 * @since 1.0, null
 */
public static class SpecialRouteInfo extends TaobaoObject {

	private static final long serialVersionUID = 2298488368933426128L;

	/**
		 * 快递公司code
		 */
		@ApiField("cp_code")
		private String cpCode;
		/**
		 * 到货区域
		 */
		@ApiField("receive_area")
		private AddressArea receiveArea;
	

	public String getCpCode() {
			return this.cpCode;
		}
		public void setCpCode(String cpCode) {
			this.cpCode = cpCode;
		}
		public AddressArea getReceiveArea() {
			return this.receiveArea;
		}
		public void setReceiveArea(AddressArea receiveArea) {
			this.receiveArea = receiveArea;
		}

}

	/**
 * 策略信息对象
 *
 * @author top auto create
 * @since 1.0, null
 */
public static class DeliveryStrategyInfo extends TaobaoObject {

	private static final long serialVersionUID = 8647348595653819423L;

	/**
		 * 识别买家备注: 0-忽略, 1-识别, 2-仅识别合作cp
		 */
		@ApiField("buyer_message_rule")
		private Long buyerMessageRule;
		/**
		 * 合作CP信息
		 */
		@ApiListField("cocp_info_list")
		@ApiField("cp_info")
		private List<CpInfo> cocpInfoList;
		/**
		 * 特殊线路
		 */
		@ApiListField("special_route_info_list")
		@ApiField("special_route_info")
		private List<SpecialRouteInfo> specialRouteInfoList;
		/**
		 * 仓id
		 */
		@ApiField("warehouse_id")
		private Long warehouseId;
		/**
		 * 仓名称
		 */
		@ApiField("warehouse_name")
		private String warehouseName;
	

	public Long getBuyerMessageRule() {
			return this.buyerMessageRule;
		}
		public void setBuyerMessageRule(Long buyerMessageRule) {
			this.buyerMessageRule = buyerMessageRule;
		}
		public List<CpInfo> getCocpInfoList() {
			return this.cocpInfoList;
		}
		public void setCocpInfoList(List<CpInfo> cocpInfoList) {
			this.cocpInfoList = cocpInfoList;
		}
		public List<SpecialRouteInfo> getSpecialRouteInfoList() {
			return this.specialRouteInfoList;
		}
		public void setSpecialRouteInfoList(List<SpecialRouteInfo> specialRouteInfoList) {
			this.specialRouteInfoList = specialRouteInfoList;
		}
		public Long getWarehouseId() {
			return this.warehouseId;
		}
		public void setWarehouseId(Long warehouseId) {
			this.warehouseId = warehouseId;
		}
		public String getWarehouseName() {
			return this.warehouseName;
		}
		public void setWarehouseName(String warehouseName) {
			this.warehouseName = warehouseName;
		}

}

	/**
 * 智能发货设置请求参数
 *
 * @author top auto create
 * @since 1.0, null
 */
public static class DeliveryStrategySetRequest extends TaobaoObject {

	private static final long serialVersionUID = 8338466434627265222L;

	/**
		 * 策略信息对象
		 */
		@ApiField("delivery_strategy_info")
		private DeliveryStrategyInfo deliveryStrategyInfo;
	

	public DeliveryStrategyInfo getDeliveryStrategyInfo() {
			return this.deliveryStrategyInfo;
		}
		public void setDeliveryStrategyInfo(DeliveryStrategyInfo deliveryStrategyInfo) {
			this.deliveryStrategyInfo = deliveryStrategyInfo;
		}

}


}